.class public Lcom/waiqin365/lightapp/dailyreport/b/a/ab;
.super Lcom/waiqin365/lightapp/dailyreport/b/a/u;


# instance fields
.field public a:Ljava/lang/String;

.field public b:Ljava/lang/String;

.field public f:Ljava/lang/String;

.field public g:Ljava/util/List;


# direct methods
.method public constructor <init>()V
    .locals 1

    const/16 v0, 0xde

    invoke-direct {p0, v0}, Lcom/waiqin365/lightapp/dailyreport/b/a/u;-><init>(I)V

    const-string/jumbo v0, "1"

    iput-object v0, p0, Lcom/waiqin365/lightapp/dailyreport/b/a/ab;->a:Ljava/lang/String;

    const-string/jumbo v0, ""

    iput-object v0, p0, Lcom/waiqin365/lightapp/dailyreport/b/a/ab;->b:Ljava/lang/String;

    const-string/jumbo v0, ""

    iput-object v0, p0, Lcom/waiqin365/lightapp/dailyreport/b/a/ab;->f:Ljava/lang/String;

    new-instance v0, Ljava/util/ArrayList;

    invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V

    iput-object v0, p0, Lcom/waiqin365/lightapp/dailyreport/b/a/ab;->g:Ljava/util/List;

    return-void
.end method


# virtual methods
.method public a(Ljava/lang/String;)Z
    .locals 8

    const/4 v7, 0x1

    :try_start_0
    new-instance v0, Lorg/json/JSONObject;

    invoke-direct {v0, p1}, Lorg/json/JSONObject;-><init>(Ljava/lang/String;)V

    const-string/jumbo v1, "code"

    invoke-virtual {v0, v1}, Lorg/json/JSONObject;->has(Ljava/lang/String;)Z

    move-result v1

    if-eqz v1, :cond_0

    const-string/jumbo v1, "code"

    invoke-virtual {v0, v1}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    iput-object v1, p0, Lcom/waiqin365/lightapp/dailyreport/b/a/ab;->a:Ljava/lang/String;

    :cond_0
    const-string/jumbo v1, "message"

    invoke-virtual {v0, v1}, Lorg/json/JSONObject;->has(Ljava/lang/String;)Z

    move-result v1

    if-eqz v1, :cond_1

    const-string/jumbo v1, "message"

    invoke-virtual {v0, v1}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    iput-object v1, p0, Lcom/waiqin365/lightapp/dailyreport/b/a/ab;->b:Ljava/lang/String;

    :cond_1
    const-string/jumbo v1, "data"

    invoke-virtual {v0, v1}, Lorg/json/JSONObject;->has(Ljava/lang/String;)Z

    move-result v1

    if-eqz v1, :cond_7

    const-string/jumbo v1, "data"

    invoke-virtual {v0, v1}, Lorg/json/JSONObject;->getJSONArray(Ljava/lang/String;)Lorg/json/JSONArray;

    move-result-object v5

    if-eqz v5, :cond_7

    invoke-virtual {v5}, Lorg/json/JSONArray;->length()I

    move-result v0

    if-lez v0, :cond_7

    const/4 v0, 0x0

    move v4, v0

    :goto_0
    invoke-virtual {v5}, Lorg/json/JSONArray;->length()I

    move-result v0

    if-ge v4, v0, :cond_7

    new-instance v0, Lcom/waiqin365/lightapp/kehu/share/a/c;

    invoke-direct {v0}, Lcom/waiqin365/lightapp/kehu/share/a/c;-><init>()V

    invoke-virtual {v5, v4}, Lorg/json/JSONArray;->getJSONObject(I)Lorg/json/JSONObject;

    move-result-object v6

    const-string/jumbo v1, "id"

    invoke-virtual {v6, v1}, Lorg/json/JSONObject;->has(Ljava/lang/String;)Z

    move-result v1

    if-eqz v1, :cond_3

    const-string/jumbo v1, "id"

    invoke-virtual {v6, v1}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    move-object v3, v1

    :goto_1
    const-string/jumbo v1, "name"

    invoke-virtual {v6, v1}, Lorg/json/JSONObject;->has(Ljava/lang/String;)Z

    move-result v1

    if-eqz v1, :cond_4

    const-string/jumbo v1, "name"

    invoke-virtual {v6, v1}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    move-object v2, v1

    :goto_2
    const-string/jumbo v1, "type"

    invoke-virtual {v6, v1}, Lorg/json/JSONObject;->has(Ljava/lang/String;)Z

    move-result v1

    if-eqz v1, :cond_5

    const-string/jumbo v1, "type"

    invoke-virtual {v6, v1}, Lorg/json/JSONObject;->getString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    :goto_3
    const-string/jumbo v6, "0"

    invoke-virtual {v6, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-eqz v1, :cond_6

    invoke-static {}, Lcom/fiberhome/gaea/client/base/ExmobiApp;->b()Lcom/fiberhome/gaea/client/base/ExmobiApp;

    move-result-object v0

    invoke-static {v0}, Lcom/waiqin365/base/db/offlinedata/m;->a(Landroid/content/Context;)Lcom/waiqin365/base/db/offlinedata/m;

    move-result-object v0

    invoke-virtual {v0, v3}, Lcom/waiqin365/base/db/offlinedata/m;->i(Ljava/lang/String;)Lcom/waiqin365/lightapp/kehu/share/a/c;

    move-result-object v0

    :goto_4
    if-eqz v0, :cond_2

    const-string/jumbo v1, "1"

    iput-object v1, v0, Lcom/waiqin365/lightapp/kehu/share/a/c;->v:Ljava/lang/String;

    iget-object v1, p0, Lcom/waiqin365/lightapp/dailyreport/b/a/ab;->g:Ljava/util/List;

    invoke-interface {v1, v0}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    :cond_2
    add-int/lit8 v0, v4, 0x1

    move v4, v0

    goto :goto_0

    :cond_3
    const-string/jumbo v1, ""

    move-object v3, v1

    goto :goto_1

    :cond_4
    const-string/jumbo v1, ""

    move-object v2, v1

    goto :goto_2

    :cond_5
    const-string/jumbo v1, ""

    goto :goto_3

    :cond_6
    iput-object v3, v0, Lcom/waiqin365/lightapp/kehu/share/a/c;->a:Ljava/lang/String;

    iput-object v2, v0, Lcom/waiqin365/lightapp/kehu/share/a/c;->b:Ljava/lang/String;

    const-string/jumbo v1, "1"

    iput-object v1, v0, Lcom/waiqin365/lightapp/kehu/share/a/c;->u:Ljava/lang/String;
    :try_end_0
    .catch Lorg/json/JSONException; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_4

    :catch_0
    move-exception v0

    invoke-virtual {v0}, Lorg/json/JSONException;->printStackTrace()V

    :cond_7
    return v7
.end method
